Optimal. Leaf size=110 \[ -\frac {11 a^3 \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {3 a^3 \cot (c+d x)}{d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{2 d}+\frac {2 a^3 \cos (c+d x)}{3 d (1-\sin (c+d x))^2}+\frac {17 a^3 \cos (c+d x)}{3 d (1-\sin (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 110, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 7, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {2951, 3855,
3852, 8, 3853, 2729, 2727} \begin {gather*} -\frac {3 a^3 \cot (c+d x)}{d}+\frac {17 a^3 \cos (c+d x)}{3 d (1-\sin (c+d x))}+\frac {2 a^3 \cos (c+d x)}{3 d (1-\sin (c+d x))^2}-\frac {11 a^3 \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2727
Rule 2729
Rule 2951
Rule 3852
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \csc ^3(c+d x) \sec ^4(c+d x) (a+a \sin (c+d x))^3 \, dx &=a^4 \int \left (\frac {5 \csc (c+d x)}{a}+\frac {3 \csc ^2(c+d x)}{a}+\frac {\csc ^3(c+d x)}{a}+\frac {2}{a (-1+\sin (c+d x))^2}-\frac {5}{a (-1+\sin (c+d x))}\right ) \, dx\\ &=a^3 \int \csc ^3(c+d x) \, dx+\left (2 a^3\right ) \int \frac {1}{(-1+\sin (c+d x))^2} \, dx+\left (3 a^3\right ) \int \csc ^2(c+d x) \, dx+\left (5 a^3\right ) \int \csc (c+d x) \, dx-\left (5 a^3\right ) \int \frac {1}{-1+\sin (c+d x)} \, dx\\ &=-\frac {5 a^3 \tanh ^{-1}(\cos (c+d x))}{d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{2 d}+\frac {2 a^3 \cos (c+d x)}{3 d (1-\sin (c+d x))^2}+\frac {5 a^3 \cos (c+d x)}{d (1-\sin (c+d x))}+\frac {1}{2} a^3 \int \csc (c+d x) \, dx-\frac {1}{3} \left (2 a^3\right ) \int \frac {1}{-1+\sin (c+d x)} \, dx-\frac {\left (3 a^3\right ) \text {Subst}(\int 1 \, dx,x,\cot (c+d x))}{d}\\ &=-\frac {11 a^3 \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {3 a^3 \cot (c+d x)}{d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{2 d}+\frac {2 a^3 \cos (c+d x)}{3 d (1-\sin (c+d x))^2}+\frac {17 a^3 \cos (c+d x)}{3 d (1-\sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.39, size = 190, normalized size = 1.73 \begin {gather*} \frac {a^3 \left (-36 \cot \left (\frac {1}{2} (c+d x)\right )-3 \csc ^2\left (\frac {1}{2} (c+d x)\right )-132 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+132 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+3 \sec ^2\left (\frac {1}{2} (c+d x)\right )+\frac {16}{\left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {32 \sin \left (\frac {1}{2} (c+d x)\right )}{\left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^3}+\frac {272 \sin \left (\frac {1}{2} (c+d x)\right )}{\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )}+36 \tan \left (\frac {1}{2} (c+d x)\right )\right )}{24 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.27, size = 188, normalized size = 1.71
method | result | size |
risch | \(\frac {a^{3} \left (-99 i {\mathrm e}^{5 i \left (d x +c \right )}+33 \,{\mathrm e}^{6 i \left (d x +c \right )}+210 i {\mathrm e}^{3 i \left (d x +c \right )}-154 \,{\mathrm e}^{4 i \left (d x +c \right )}-123 i {\mathrm e}^{i \left (d x +c \right )}+161 \,{\mathrm e}^{2 i \left (d x +c \right )}-52\right )}{3 \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2} \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{3} d}+\frac {11 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}-\frac {11 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}\) | \(148\) |
derivativedivides | \(\frac {a^{3} \left (\frac {1}{3 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{3}}-\frac {5}{6 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )}+\frac {5}{2 \cos \left (d x +c \right )}+\frac {5 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+3 a^{3} \left (\frac {1}{3 \sin \left (d x +c \right ) \cos \left (d x +c \right )^{3}}+\frac {4}{3 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {8 \cot \left (d x +c \right )}{3}\right )+3 a^{3} \left (\frac {1}{3 \cos \left (d x +c \right )^{3}}+\frac {1}{\cos \left (d x +c \right )}+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )-a^{3} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )}{d}\) | \(188\) |
default | \(\frac {a^{3} \left (\frac {1}{3 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{3}}-\frac {5}{6 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )}+\frac {5}{2 \cos \left (d x +c \right )}+\frac {5 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+3 a^{3} \left (\frac {1}{3 \sin \left (d x +c \right ) \cos \left (d x +c \right )^{3}}+\frac {4}{3 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {8 \cot \left (d x +c \right )}{3}\right )+3 a^{3} \left (\frac {1}{3 \cos \left (d x +c \right )^{3}}+\frac {1}{\cos \left (d x +c \right )}+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )-a^{3} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )}{d}\) | \(188\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.35, size = 182, normalized size = 1.65 \begin {gather*} \frac {12 \, {\left (\tan \left (d x + c\right )^{3} - \frac {3}{\tan \left (d x + c\right )} + 6 \, \tan \left (d x + c\right )\right )} a^{3} + 4 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a^{3} + a^{3} {\left (\frac {2 \, {\left (15 \, \cos \left (d x + c\right )^{4} - 10 \, \cos \left (d x + c\right )^{2} - 2\right )}}{\cos \left (d x + c\right )^{5} - \cos \left (d x + c\right )^{3}} - 15 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + 6 \, a^{3} {\left (\frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{2} + 1\right )}}{\cos \left (d x + c\right )^{3}} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 428 vs.
\(2 (98) = 196\).
time = 0.36, size = 428, normalized size = 3.89 \begin {gather*} -\frac {104 \, a^{3} \cos \left (d x + c\right )^{4} + 142 \, a^{3} \cos \left (d x + c\right )^{3} - 90 \, a^{3} \cos \left (d x + c\right )^{2} - 136 \, a^{3} \cos \left (d x + c\right ) - 8 \, a^{3} + 33 \, {\left (a^{3} \cos \left (d x + c\right )^{4} - a^{3} \cos \left (d x + c\right )^{3} - 3 \, a^{3} \cos \left (d x + c\right )^{2} + a^{3} \cos \left (d x + c\right ) + 2 \, a^{3} + {\left (a^{3} \cos \left (d x + c\right )^{3} + 2 \, a^{3} \cos \left (d x + c\right )^{2} - a^{3} \cos \left (d x + c\right ) - 2 \, a^{3}\right )} \sin \left (d x + c\right )\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 33 \, {\left (a^{3} \cos \left (d x + c\right )^{4} - a^{3} \cos \left (d x + c\right )^{3} - 3 \, a^{3} \cos \left (d x + c\right )^{2} + a^{3} \cos \left (d x + c\right ) + 2 \, a^{3} + {\left (a^{3} \cos \left (d x + c\right )^{3} + 2 \, a^{3} \cos \left (d x + c\right )^{2} - a^{3} \cos \left (d x + c\right ) - 2 \, a^{3}\right )} \sin \left (d x + c\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 2 \, {\left (52 \, a^{3} \cos \left (d x + c\right )^{3} - 19 \, a^{3} \cos \left (d x + c\right )^{2} - 64 \, a^{3} \cos \left (d x + c\right ) + 4 \, a^{3}\right )} \sin \left (d x + c\right )}{12 \, {\left (d \cos \left (d x + c\right )^{4} - d \cos \left (d x + c\right )^{3} - 3 \, d \cos \left (d x + c\right )^{2} + d \cos \left (d x + c\right ) + {\left (d \cos \left (d x + c\right )^{3} + 2 \, d \cos \left (d x + c\right )^{2} - d \cos \left (d x + c\right ) - 2 \, d\right )} \sin \left (d x + c\right ) + 2 \, d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.64, size = 150, normalized size = 1.36 \begin {gather*} \frac {3 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 132 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 36 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {3 \, {\left (66 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{3}\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}} - \frac {16 \, {\left (21 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 36 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 19 \, a^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}}}{24 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 9.14, size = 183, normalized size = 1.66 \begin {gather*} \frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}+\frac {11\,a^3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,d}-\frac {-62\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {227\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{2}-\frac {403\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{6}+\frac {9\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}+\frac {a^3}{2}}{d\,\left (-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+12\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-12\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}+\frac {3\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________